package com.tyros.web.banner;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhangshuaiyin
 * @date 2022/1/27 21:39
 */
@Slf4j
@Configuration
@EnableConfigurationProperties(TyrosProperties.class)
@ConditionalOnProperty(prefix = "tyros.banner", name = "enable", havingValue = "true", matchIfMissing = true)
public class TyrosRunnerAutoConfiguration {

    @Bean
    public TyrosRunner tyrosRunner() {
        return new TyrosRunner();
    }
}
